{{ ansible_managed | comment }}
# see: Systemd Unit configuration logic -- http://man7.org/linux/man-pages/man5/systemd.unit.5.html for more details

{% if "Unit" in config %}
[Unit]
{% for key, value in config["Unit"].items() %}
{% if config.type is defined and config.type == "conf" %}
{{ key }}=
{% endif %}
{{ key }}={{ value }}
{% endfor %}
{% endif %}

{% if config.type|default(_default_unit_type)|title in config %}
[{{ config.type|default(_default_unit_type)|title }}]
{% for key, value in config[config.type|default(_default_unit_type)|title].items() %}
{{ key }}={{ value }}
{% endfor %}
{% endif %}

{% if "Install" in config %}
[Install]
{% for key, value in config["Install"].items() %}
{{ key }}={{ value }}
{% endfor %}
{% endif %}
